import axios from './axios'  //接受axios.js返回的实例，取名为axios

//注意书写！！ 必须进行export
//用户登陆接口
export const login = (param) => {
    return axios.request({
        url: 'api/auth/login',
        method: 'post',
        data: param
    })
}

export const getStatisticData = (param) => {
    return axios.request({
        url: 'getData/getStatisticData',
        method: 'post',
        data: param
    })
}

export const getBasicInfo = (param) => {
    return axios.request({
        url: 'basicInfo/getInfo',
        method: 'post',
        data: param
    })
}

export const deleteBasicInfo = (param) => {
    return axios.request({
        url: 'basicInfo/deleteInfo',
        method: 'post',
        data: param
    })
}

export const updateBasicInfo = (param) => {
    return axios.request({
        url: 'basicInfo/updateAndCreateInfo',
        method: 'post',
        data: param
    })
}

export const getStudentIntroducePdf = (param) => {
    return axios.request({
        url: 'basicInfo/getStudentIntroducePdf',
        method: 'post',
        responseType: 'arraybuffer',   //一定要设置响应类型，否则页面会是空白pdf
        data: param
    })
}


export const getHonorsInfo = (param) => {
    return axios.request({
        url: 'honorInfo/getInfo',
        method: 'post',
        data: param
    })
}
export const deleteHonorsInfo = (param) => {
    return axios.request({
        url: 'honorInfo/deleteInfo',
        method: 'post',
        data: param
    })
}
export const updateHonorsInfo = (param) => {
    return axios.request({
        url: 'honorInfo/updateAndCreateInfo',
        method: 'post',
        data: param
    })
}
export const getDailyInfo = (param) => {
    return axios.request({
        url: 'dailyActivity/getInfo',
        method: 'post',
        data: param
    })
}
export const deleteDailyInfo = (param) => {
    return axios.request({
        url: 'dailyActivity/deleteInfo',
        method: 'post',
        data: param
    })
}
export const updateDailyInfo = (param) => {
    return axios.request({
        url: 'dailyActivity/updateAndCreateInfo',
        method: 'post',
        data: param
    })
}
export const getCourseInfo = (param) => {
    return axios.request({
        url: 'courseInfo/getInfo',
        method: 'post',
        data: param
    })
}
export const deleteCourseInfo = (param) => {
    return axios.request({
        url: 'courseInfo/deleteInfo',
        method: 'post',
        data: param
    })
}
export const updateCourseInfo = (param) => {
    return axios.request({
        url: 'courseInfo/updateAndCreateInfo',
        method: 'post',
        data: param
    })
}
export const getPracticeInfo = (param) => {
    return axios.request({
        url: 'practiceInfo/getInfo',
        method: 'post',
        data: param
    })
}
export const deletePracticeInfo = (param) => {
    return axios.request({
        url: 'practiceInfo/deleteInfo',
        method: 'post',
        data: param
    })
}
export const updatePracticeInfo = (param) => {
    return axios.request({
        url: 'practiceInfo/updateAndCreateInfo',
        method: 'post',
        data: param
    })
}
export const getLeavingInfo = (param) => {
    return axios.request({
        url: 'leavingInfo/getInfo',
        method: 'post',
        data: param
    })
}
export const deleteLeavingInfo = (param) => {
    return axios.request({
        url: 'leavingInfo/deleteInfo',
        method: 'post',
        data: param
    })
}
export const updateLeavingInfo = (param) => {
    return axios.request({
        url: 'leavingInfo/updateAndCreateInfo',
        method: 'post',
        data: param
    })
}
export const deleteSelectInfo = (param) => {
    return axios.request({
        url: 'studentCourse/deleteInfo',
        method: 'post',
        data: param
    })
}
export const getSelectInfo = (param) => {
    return axios.request({
        url: 'studentCourse/getInfo',
        method: 'post',
        data: param
    })
}
export const updateSelectInfo = (param) => {
    return axios.request({
        url: 'studentCourse/updateAndCreateInfo',
        method: 'post',
        data: param
    })
}
export const getCardInfo = (param) => {
    return axios.request({
        url: 'campusCardCost/getInfo',
        method: 'post',
        data: param
    })
}
export const deleteCardInfo = (param) => {
    return axios.request({
        url: 'campusCardCost/deleteInfo',
        method: 'post',
        data: param
    })
}
export const updateCardInfo = (param) => {
    return axios.request({
        url: 'campusCardCost/updateAndCreateInfo',
        method: 'post',
        data: param
    })
}
